package com.uzhie.jt808.task;

import org.apache.log4j.Logger;

/**
 * Created by TangFei on 2018/9/17.
 * 通知阻塞的平台下发线程
 */
public class TaskCommonNotify implements Runnable {

    private Logger logger = Logger.getLogger(getClass());

    private Thread lockThread;

    public TaskCommonNotify(Thread lockThread) {
        this.lockThread = lockThread;
    }

    @Override
    public void run() {
        synchronized (lockThread) {
            logger.trace("notify lock is " + lockThread);
            lockThread.notify();
            logger.trace("收到终端应答，通知等待线程");
        }
    }
}
